<template>
  <div
    class="hamburger"
    @click="toggleClick"
  >
    <em-icon
      :name="icon"
      :class="{'is-active':isActive}"
    />
  </div>
</template>

<script>
export default {
  name: 'Hamburger',
  props: {
    isActive: {
      type: Boolean,
      default: false
    },
    icon: {
      type: String,
      default: ''
    }
  },
  methods: {
    toggleClick() {
      this.$emit('toggleClick')
    }
  }
}
</script>

<style lang="scss" scoped>
.hamburger {
  .em-icon {
    display: inline-block;
    vertical-align: middle;
    &.is-active {
      transform: rotate(180deg);
    }
  }
}
</style>
